projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fda53e5
)
Avoid a redundant strlen
author
Matthias Clasen
<mclasen@redhat.com>
Sat, 28 Jun 2014 05:51:24 +0000
(
01:51
-0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Sat, 28 Jun 2014 05:51:24 +0000
(
01:51
-0400)
The GString knows perfectly well how long it is. Pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=731158
gtk/gtkbookmarksmanager.c
patch
|
blob
|
history
diff --git
a/gtk/gtkbookmarksmanager.c
b/gtk/gtkbookmarksmanager.c
index 197c4cee8a03c547eb7c54c41651d1b6bb90c325..968b49c525cd58845b935279acc1053d1ed5e85f 100644
(file)
--- a/
gtk/gtkbookmarksmanager.c
+++ b/
gtk/gtkbookmarksmanager.c
@@
-160,7
+160,7
@@
save_bookmarks (GFile *bookmarks_file,
}
if (!g_file_replace_contents (bookmarks_file,
contents->str,
-
strlen (contents->str)
,
+
contents->len
,
NULL, FALSE, 0, NULL,
NULL, &error))
goto out;